//---------------------------------------------------------------------------

#ifndef FormulaHelperH
#define FormulaHelperH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxRichEdit.hpp"
#include "dxColorEdit.hpp"
#include "cxDBLookupComboBox.hpp"
#include "cxDBLookupEdit.hpp"
#include "cxLookupEdit.hpp"
#include "cxDBExtLookupComboBox.hpp"
#include "RegExp.h"

class TFormulaHelper {
private:
	TcxRichEdit *edit;

	TcxLookupComboBox *combo;
public:

	void __fastcall Init(TForm* Owner,TcxRichEdit *RichEdit,TDataSource* dataSource);

	String __fastcall GetFormula();

	void __fastcall SetFormula(String code);

	void __fastcall LookupComboBoxPropertiesChange(TObject *Sender);

	void __fastcall LookupComboBoxKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);

	void __fastcall LookupComboBoxEditValueChanged(TObject *Sender);

	void __fastcall LookupComboBoxKeyPress(TObject *Sender, wchar_t &Key);

	void __fastcall RichEditFocusChanged(TObject *Sender);

	void __fastcall RichEditKeyPress(TObject *Sender, wchar_t &Key);
};
#endif
